import { API, ApiModelProps } from "@/request/api";
import { Form, Button, Popconfirm, message } from "antd";
import { useNavigate } from "react-router-dom";

interface IProps {
    id: string,
    url: string,
    onDelete: Function,
    onEdit: Function,
}
const TableCoulumAction = (props: IProps) => {    
    const handlerItemExit = () => {
       props.onEdit(props.id);
    }
    const handlerItemDelete = async () => {
        props.onDelete(props.id);
    }
    return (
        <>
            <Popconfirm title="确认删除吗?" onConfirm={handlerItemDelete}>
                <Button danger type="link">删除</Button>
            </Popconfirm>
            <Button type="link" onClick={handlerItemExit}>编辑</Button>
        </>

    )
}
export default TableCoulumAction;